package com.carbon;

import cn.hutool.core.util.IdUtil;
import cn.hutool.json.JSONUtil;
import com.carbon.common.core.domain.AjaxResult;
import com.carbon.common.utils.http.HttpUtils;
import com.carbon.common.utils.ip.AddressUtils;
import com.carbon.common.utils.ip.IpUtils;
import com.carbon.common.utils.uuid.IdUtils;
import com.carbon.domain.Carrier;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Map;

/**
 * @author WangFK
 * @version 1.0
 * @since 2023/8/26 15:15
 */
public class test {
    public static void main(String[] args) {

//        String baseUrl="https://www.mxnzp.com/api/ip/self";
//        String params="app_id=idgorwnnojpowkrl&app_secret=wDKi9GfjUSlvAKb5ftYmV0IoB02PU5ys";
//        String s = HttpUtils.sendGet(baseUrl, params);
//        AjaxResult result = JSONUtil.toBean(JSONUtil.toJsonStr(s), AjaxResult.class);
//        Map data = (Map) result.get("data");
//        String ip = data.get("ip").toString();
//        System.out.println(ip);
//        String addressByIP = AddressUtils.getRealAddressByIP(ip);
//        System.out.println(addressByIP);



    }
}
